<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //Object.create() 创造
        const target ={a:1,
        getName(){
            console.log(`my name is ${this.name},age${this.age}`)
        }}
        const source = Object.create(target)
        source.age = 12
        source.name ='haha'
        source.getName()
        //创建一个纯净对象
        const obj = Object.create(null)
        console.log(obj)
    </script>
</body>
</html>